﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 易仓库存信息
    /// </summary>
    /// 

    public class Ec_InventoryBatchDTO
    {
        public string code { get; set; }
        public string message { get; set; }
        public string requestId { get; set; }
        public long timestamp { get; set; }
        public string version { get; set; }
        public string nonce_str { get; set; }
        public string sign_type { get; set; }
        public string sign { get; set; }
        public string biz_content { get; set; }

    }


    public class Ec_InventoryBatch_Data
    {
        public string total { get; set; }
        public string ib_id { get; set; }
        public int page { get; set; }
        public int page_size { get; set; }
        public List<Ec_InventoryBatch> data { get; set; }
    }

    public class Ec_InventoryBatch
    {
        public string ID { get; set; }

        public string RowId { get; set; }

        /// <summary>
        /// 批次库存id
        /// </summary>
        public string ib_id { get; set; }

        /// <summary>
        /// 仓库Id
        /// </summary>
        public string warehouse_id { get; set; }
        /// <summary>
        /// 产品SKU代码
        /// </summary>
        public string product_sku { get; set; }
        /// <summary>
        /// 库位
        /// </summary>
        public string lc_code { get; set; }

        /// <summary>
        /// 可用数量	
        /// </summary>
        public int ib_quantity { get; set; }
        /// <summary>
        /// 待出数量	
        /// </summary>
        public int out_quantity { get; set; }
        /// <summary>
        /// 参考单号	
        /// </summary>
        public string reference_no { get; set; }
        /// <summary>
        /// 入库单号	
        /// </summary>
        public string receiving_code { get; set; }
        /// <summary>
        /// 采购单号	
        /// </summary>
        public string po_code { get; set; }
        /// <summary>
        /// 状态	
        /// </summary>
        private string _ib_status;
        public string ib_status
        {
            get { return _ib_status; }

            set 
            {
                if (value == "0") _ib_status = "已用完/不可用";
                else if (value == "1") _ib_status = "可用";
                else _ib_status = value;
            }
        }
        /// <summary>
        /// 锁状态	
        /// </summary>
        private string _ib_hold_status;
        public string ib_hold_status
        {
            get { return _ib_hold_status; }

            set
            {
                if (value == "0") _ib_hold_status = "无";
                else if (value == "1") _ib_hold_status = "盘点锁";
                else if (value == "2") _ib_hold_status = "借领用锁";
                else _ib_hold_status = value;
            }
        }
        /// <summary>
        /// 状态	
        /// </summary>
        private string _ib_type;
        public string ib_type
        {
            get { return _ib_type; }

            set
            {
                if (value == "0") _ib_type = "标准";
                else if (value == "1") _ib_type = "不良品";
                else _ib_type = value;
            }
        }
        /// <summary>
        /// 上架时间	
        /// </summary>
        public string ib_fifo_time { get; set; }

        /// <summary>
        /// 更新时间	
        /// </summary>
        public string ib_update_time { get; set; }

        /// <summary>
        /// 库龄	
        /// </summary>
        public int age { get; set; }
        /// <summary>
        /// 库龄(更新时间)	
        /// </summary>
        public int ageFromUpdate { get; set; }

        /// <summary>
        /// 是否需要报关	
        /// </summary>
        private string _is_need_declare;
        public string is_need_declare
        {
            get { return _is_need_declare; }

            set
            {
                if (value == "0") _is_need_declare = "否";
                else if (value == "1") _is_need_declare = "是";
                else _is_need_declare = value;
            }
        }

        /// <summary>
        /// 采购成本
        /// </summary>
        public decimal unit_price { get; set; }

        /// <summary>
        /// 采购税费	
        /// </summary>
        public decimal purchase_taxation_fee { get; set; }

        /// <summary>
        /// 采购运费	
        /// </summary>
        public decimal purchase_ship_fee { get; set; }

        /// <summary>
        /// 头程运费	
        /// </summary>
        public decimal shipping_fee { get; set; }

        /// <summary>
        /// 头程关税	
        /// </summary>
        public decimal tariff_fee { get; set; }

        /// <summary>
        /// 币种	
        /// </summary>
        public string currency_code { get; set; }
        
    }
}
